(function () {
    var animations = {
        text: '本部各部门、中心',
        card: false,
        id: 'animations',
        items: [
            {
                text: '公司领导',
                id: 'Fade',
                card: false,
                animation: {
                    type: 'fade',
                    duration: 500
                },
                leaf: true
            }
        ]};


    var root = {
        id: 'root',
        text: '组织架构',
        items: [
            {
                text: '供电单位',
                id: 'ui',
                cls: 'launchscreen',
                leaf: false,
                items: [
                    {
                        text: '昆明供电局',
                        leaf: true,
                        id: 'buttons'
                    },
                    {
                        text: '德宏供电局',
                        leaf: false,
                        id: 'forms',
                        items: [
                            {
                                text: '电力调度控制中心',
                                leaf: false,
                                view: 'FormPanel',
                                id: 'formpanel',
                                items: [
		                            {
		                                text: '解郭',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview1'
		                            },
		                            {
		                                text: '杨丽芝',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview2'
		                            },
		                            {
		                                text: '刘志钢',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview3'
		                            }
		                        ]
                                
                            },
                            {
                                text: '党群工作部',
                                leaf: false,
                                view: 'Sliders',
                                id: 'sliders',
                                items: [
		                            {
		                                text: '杨爱梅',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview4'
		                            },
		                            {
		                                text: '荀波',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview5'
		                            },
		                            {
		                                text: '邹群',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview6'
		                            },
		                            {
		                                text: '李萍',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview7'
		                            }
		                        ]
                            },
                            {
                                text: '财务部',
                                leaf: false,
                                view: 'ToolbarInput',
                                id: 'toolbarinput',
                                items: [
		                            {
		                                text: '陈妤',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview9'
		                            },
		                            {
		                                text: '黄静莹',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview10'
		                            },
		                            {
		                                text: '李桂华',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview11'
		                            },
		                            {
		                                text: '王富伟',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview12'
		                            },
		                            {
		                                text: '赵伟杰',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview13'
		                            }
		                        ]
                            },
                            {
                                text: '市场营销部',
                                leaf: false,
                                view: 'ToolbarInput',
                                id: 'toolbarinput',
                                items: [
		                            {
		                                text: '俸志成',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview20'
		                            },
		                            {
		                                text: '石如琴',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview21'
		                            },
		                            {
		                                text: '曾红',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview22'
		                            },
		                            {
		                                text: '董盛翔',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview23'
		                            },
		                            {
		                                text: '简思军',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview24'
		                            },
		                            {
		                                text: '黄晓磊',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview25'
		                            }
		                        ]
                            },
                            {
                                text: '计划建设部',
                                leaf: false,
                                view: 'ToolbarInput',
                                id: 'toolbarinput',
                                items: [
		                            {
		                                text: '陈应禄',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview26'
		                            },
		                            {
		                                text: '康星',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview27'
		                            },
		                            {
		                                text: '李沛',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview28'
		                            },
		                            {
		                                text: '刘强',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview29'
		                            },
		                            {
		                                text: '王洪利',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview30'
		                            },
		                            {
		                                text: '王岭',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview31'
		                            },
		                            {
		                                text: '文员',
		                                leaf: true,
		                                view: 'BasicDataView',
		                                id: 'basicdataview32'
		                            }
		                        ]
                            }
                        ]
                    },
                    {
                        text: '大理供电局',
                        leaf: true,
                        id: 'menus'
                    }
                ]
            }
        ]
    };

    root.items.push(animations, 
    	{
	        text: '分公司',
	        id: 'touchevents',
	        view: 'TouchEvents',
	        leaf: true
    	}, {
	        text: '子公司',
	        leaf: false,
	        id: 'media',
	        items: [
	            {
	                text: '云南省送变电工程公司',
	                leaf: true,
	                id: 'video'
	            },
	            {
	                text: '云南省火电建设公司',
	                leaf: true,
	                id: 'audio'
	            }
	        ]
	   }
    );

    Ext.define('DDMS.store.Unit', {
        alias: 'store.Unit',
        extend: 'Ext.data.TreeStore',
        requires: ['DDMS.model.Unit'],

        config: {
            model: 'DDMS.model.Unit',
            root: root,
            defaultRootProperty: 'items'
        }
    });
})();
